package com.hsp.object_;

public class Equals01 {
    public static void main(String[] args) {
        A a = new A();
        A b = a;
        A c = b;
        System.out.println(a==c);
        B bobj = a;
        System.out.println(bobj == a);//两个对象指向的是同一个对象
        "hello".equals("abc");
        Integer integer1 = new Integer(1000);
        Integer integer2 = new Integer(1000);
        System.out.println(integer1==integer2);//两个地址不一样，比较的是地址
        System.out.println(integer1.equals(integer2));//两个值一样，比较的是值

    }
}

class B{}
class A extends B{

}